﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sunboxsoft.ASMS.Client.Domain.WebRef
{
    public partial class VCapitalIncreaseBill
    {
        public string ChangedTypeText
        {
            get
            {
                if (this.ChangedType == Constant.CapitalChangedType.IncreaseReceiveable)
                {
                    return Constant.CapitalChangedType.IncreaseReceiveableItem.Text;
                }
                else if (this.ChangedType == Constant.CapitalChangedType.IncreaseOther)
                {
                    return Constant.CapitalChangedType.IncreaseOtherItem.Text;
                }
                return "unknown";
            }
        }

        public string PayerRoleTypeText
        {
            get
            {
                if (this.PayerRoleType == Constant.CapitalRoleTypes.Customer)
                {
                    return Constant.CapitalRoleTypes.CustomerItem.Text;
                }
                else if (this.PayerRoleType == Constant.CapitalRoleTypes.Staff)
                {
                    return Constant.CapitalRoleTypes.StaffItem.Text;
                }
                else if (this.PayerRoleType == Constant.CapitalRoleTypes.Supplier)
                {
                    return Constant.CapitalRoleTypes.SupplierItem.Text;
                }
                else if (this.PayerRoleType == Constant.CapitalRoleTypes.Other)
                {
                    return Constant.CapitalRoleTypes.OtherItem.Text;
                }
                return "unknown";
            }
        }

        public string BillTypeText
        {
            get
            {
                if (BillType == null)
                {
                    return string.Empty;
                }
                return Constant.BillTypes.GetText(this.BillType.Value);
            }
        }
    }
}
